﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 设计模式.工厂模式
{
    public class FactoryPatternDemo
    {
        public static void Test()
        {

            IShape shape1 = ShapeFactory.GetShape("circle");
            shape1.Draw();

            IShape shape2 = ShapeFactory.GetShape("rectangle");
            shape2.Draw();

            IShape shape3 = ShapeFactory.GetShape("square");
            shape3.Draw();
        }
    }
}
